1. Field of the Invention
The invention relates to a data processor and, more particularly, to a control system and method for controlling a memory stack.
2. Background of the Invention
By convention, not many minicomputer systems are provided with a stack structure (hardware) and the stack structure provided is insufficient in its performance. The stack is generally categorized into a control stack to save or restore the return addresses of subroutines, for example, and a data stack to save or restore data as a result of calculation, for example. A minicomputer employing such a stack is disclosed in an article "PROGRAMMING TECHNIQUES", Chapter 5, pp. 5--1 to 5--5 of "PDP--11/40 Processor Handbook" published by Digital Equipment Corporation in 1972. The stack is so designed as to exclusively store working data only, not control data. As in this case, most of the conventional stacks are designed so as to operate solely as a control stack or as a data stack, but not as a stack with both the functions.
Some medium- or large-size computer systems are provided with a stack having both the functions. When such a stack structure is applied to a minicomputer, however, the cost of the computer rises to impair one of the merits of the minicomputer, that is, a low cost.
It is for this reason that the conventional minicomputer has employed a software stack in place of a hardward stack. More specifically, a stack area is formed in a memory area. The operating system performs the save and restore operation for various register data which occur during program branching operations and the obtainment and release operation of the work area which occurs in the processing of various data through a program. For this reason, the data processing is complicated and hence the data processing speed is slow and the overhead of the software system is large.